function test()
{
if(window.sessionStorage)
alert('yes');
else
alert('no');
}
<input type=button name='ee' value='test' onclick='test();'>